<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 天梯图接口
 */
class Ladder extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    //cpu列表
    public function cpu()
    {
        $type = input('type',0);//0单核,1多核
        $where = [];
        if ($type==0){
            $order = 'monokaryon_ranking asc';
        } else {
            $order = 'multinuclear_ranking asc';
        }

        $list = \app\admin\model\Cpu::where($where)->order($order)->select();
        $this->success('',$list);
    }


    //显卡列表
    public function graphicsCard()
    {
        $list = \app\admin\model\GraphicsCard::order('ranking asc')->select();
        $this->success('',$list);
    }
}